--    Author    : ERHAO
--    Name      : ODS.ETLF_INFO.HQL
--    Functions : 
--    Purpose   : Daily saving the variation data from stg
--    Revisions or Comments
--    VER        DATE        AUTHOR           DESCRIPTION
--   ---------  ----------  ---------------  ------------------------------------
--    1.0        2018-04-13  ChenErHao          1.CREATE THE PROCEDURE
--
INSERT OVERWRITE TABLE ODS.ETLF_INFO PARTITION (DATA_DATE = '#V_DATA_DATE#' ,DATA_SRC_ORG = '#V_DATA_SRC_ORG#')
SELECT
FIN_ORG_NO
,ENTRUSTED_CLIENT_TYPE
,ENTRUSTED_CLIENT_NO
,CLIENT_TYPE
,CLIENT_NO
,CLIENT_DIST
,ECONOMY_TYPE
,ENTERPRISE_SCALE
,DUEBILL_NO
,ETL_LOAN_TYPE
,LOAN_INDUSTRY
,DRAWDOWN_DATE
,MATURITY_DATE
,ACTUAL_END_DATE
,CCY
,OCCUR_AMOUNT
,IF_FLOAT
,RATE
,GUARANTY_TYPE
,LOAN_STATUS
,DRAWDOWN_OR_REPAY
FROM 
	STG.ETLF_INFO  STG
WHERE 
	STG.DATA_SRC_ORG = '#V_DATA_SRC_ORG#' AND DATA_DATA='#V_DATA_DATE#'
;
